Skip to main content

All Questions

2votes
1answer
308views

Optimizing the exponential smoothing of a big array

I have a large set of values (let's say 1M entries) where I need to apply an exponential smoothing algorithm, but only incrementing one value at a time (all others decay to zero). The trivial ...
Laurent Grégoire's user avatar
2votes
2answers
824views

Line intersection detection algorithm

I'm trying to detect if a line drawn by the user intersects itself. I'm using a line intersection detection algorithm that goes through each waypoint of the line and checks if intersects with any ...
user594883's user avatar
0votes
2answers
759views

How fast should a Python factoring script be?

Just how efficient is "good enough" for all intents and purposes? I wrote a script to simply list off all numbers that divide into an input, x, as pairs (i, n//i) and was just curious how efficient I ...
Plopperzz's user avatar
8votes
3answers
5kviews

What is the best way to keep track of the median?

I read a question, and I'm looking for input on how to solve it: Numbers are randomly generated and stored into an (expanding) array, How would you keep track of the median? There are two data ...
Steven Mou's user avatar

close